
function Storage() {

  //构造函数
  function Storage() {
    return this
  }

  // 保存签到时间
  Storage.prototype.setSign = function () {
    wx.setStorageSync("sign_time", new Date().getTime());
  }

  // 获取签到时间
  Storage.prototype.getSign = function () {
    try {
      var res = wx.getStorageSync('sign_time')
      return res;
    } catch (e) {
      // Do something when catch error
      return false;
    }
  }

  return new Storage();
}


module.exports = {
  Storage: Storage
}
